#! /usr/bin/env python2.6
# -*- coding: utf-8-*-

import httplib, sys

host = sys.argv[1]
#headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"}

h = httplib.HTTPConnection(host)
h.request('GET', '')

response = h.getresponse()
if response.status == 200:
	f = open(sys.argv[1] + ".html", 'w')
	f.write(response.read())
	f.close()